f = [0 0.05 0.05 1]; m = [0 0 1 1];
b = fir2(50,f,m)
% b = [0.1 0.5 0.4];
[h,w] = freqz(b,1,128);
plot(f,m,w/pi,abs(h))
legend('Ideal','fir2 Designed')
title('Comparison of Frequency Response Magnitudes')




a = [5]; b = [1,4];
%y = filtfilt(b,a,x);
[h, w] = freqz(xcorr(b,b),xcorr(a,a));
plot(w / pi, abs(h));
